﻿using UnityEngine;
using System.Collections;

namespace UI
{
    public class SubContentBase : MonoBehaviour, ISubContent
    {
        protected bool isShow = false;
        public bool IsShow()
        {
            return isShow;
        }
        public void SetShow(bool isShow)
        {
            this.isShow = isShow;
        }
        public virtual void ShowTab()
        {
            if (isShow)
            {
                ReShowTab();
            }
            else
            {
                OnShowTab();
            }
            isShow = true;

        }
        public virtual void ReShowTab()
        {

        }

        public virtual void OnShowTab()
        {

        }
        public virtual void CloseTab()
        {
            isShow = false;
        }
        public virtual void OnRemoveCoverPage()
        {

        }
        public virtual void OnPageClose()
        {
            isShow = false;
        }
    }
}